﻿/************************************************************************
 * SMLib - State Model Library
 * Copyright (C) 2012-2013 Ali Khalili (khalili_DOT_ir_@SIGN_gmail_DOT_com)
 * **********************************************************************
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License (LGPL) published 
 * by the Free Software Foundation; either version 2.1 of the License, or (at your
 * option) any later version. This program is distributed without any
 * warranty. See the GNU Lesser General Public License for more details. 
 * ***********************************************************************
 * File         :     SMLib\Automata\Base\StringSymbol.cs
 * Description  :     Implementation of ISymbol for string symbols
 * Change log   :     -22 Feb 2013: Add Symbol T
 * To Do        :
 ************************************************************************/
using System;

namespace SMLib.Automata.Base
{
    /// <summary>
    /// An implementation of ISymbol for symbols consisting a string
    /// </summary>
    public class StringSymbol : Symbol<string>
    {
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="data">value of the symbol, it should not be null or empty string</param>
        public StringSymbol(string data)
        {
            if (data == null || data.Equals(""))
                throw new Exception("The value of string symbol should be a non-empty string!");

            this.mySymbol = data;
        }
    }
}
